/*
 * COPYRIGHT. HSBC HOLDINGS PLC 2009. ALL RIGHTS RESERVED.
 * 
 * This software is only to be used for the purpose for which it has been
 * provided. No part of it is to be reproduced, disassembled, transmitted,
 * stored in a retrieval system nor translated in any human or computer
 * language in any way or for any other purposes whatsoever without the prior
 * written consent of HSBC Holdings plc.
 */
package net.jonbuck.tassoo.eventmanager.events;

/**
 * <p>
 * <b> ContactBarEvent is the base class for all events within the Contact Bar.
 * </b>
 * 
 * This class provides the generic interface for dispatching an event with
 * subclasses providing a specific implementation in each case.
 * </p>
 * 
 * @since 1.0.0
 */
public interface TassooEvent {

    /**
     * <p>
     * <b> Dispatches the event on the listener. </b>
     * 
     * The listener is passed to the event so that the event can call the
     * appropriate method within the listener. Before calling the listeners
     * method the event should check that the listener being passed is a valid
     * listener by testing the instance, if the listener is not valid then
     * clients should throw an UnsupportedListenerException detailing what
     * listener the event expected and what listener the event was given. Once
     * the listener has been validated the event should then cast the listener
     * to the correct type and call the method on the listener.
     * </p>
     * 
     * @param listener
     *            the listener that the event will call for this event.
     */
    void dispatchEvent(Object listener);

}
